const { GameServer } = require('board-game');
const { server } = require('./config');

const CountingGame = require('./game');
const CountingRole = require('./role');
const CountingBoard = require('./board');

GameServer.start({
    confirmWrong: ({ role }) => role.confirmWrong(),
    doPass: ({ role }) => role.doPass(),
    doCount: ({ role }) => role.doCount(),
}, {
    Game: CountingGame,
    Board: CountingBoard,
    Role: CountingRole,
}, server, {
    index: './web/index.js',
    compress: process.env.NODE_ENV !== 'development',
    watch: process.env.NODE_ENV === 'development',
    stats: 'verbose',
    devtools: process.env.NODE_ENV === 'development'
});
